package com.company.common.server.log;

import com.company.cloud.common.bean.LoginSimpleUserInfo;
import com.company.cloud.common.utils.AuthContextUtils;
import lombok.extern.log4j.Log4j2;

@Log4j2
public class LogSaasUtils {
/*

    public static UserBrowseObjLogAddRequest getUserBrowseObjLog(String relIdType,String relId){
        UserBrowseObjLogAddRequest request = new UserBrowseObjLogAddRequest();

        LoginSimpleUserInfo userInfo = AuthContextUtils.getUserNoValidate();
        if(userInfo!=null){
            request.setCompanyNo(userInfo.getCompanyNo());
            request.setUserId(userInfo.getId());
            request.setThirdUserId(userInfo.getThirdId());
            request.setIp(userInfo.getIp());
        }else{
            request.setCompanyNo(AuthContextUtils.getCompanyNoNoValidate());
            request.setAnonymousToken(AuthContextUtils.getAnonyUserToken());
            request.setIp(AuthContextUtils.getIp());
        }
        request.setRelIdType(relIdType);
        request.setRelId(relId);
//      request.setReferralUserId();
        request.setReferralCode(AuthContextUtils.getShareCode());
        return request;
    }

    public static void saveUserBrowseObjLogOne( UbaLogRemoteService ubaLogRemoteService,String relIdType,String relId){
        if(ubaLogRemoteService!=null){
            System.out.println("++++++++++++++++ saveUserBrowseObjLogOne:id="+relId);
            UserBrowseObjLogAddRequest request= LogSaasUtils.getUserBrowseObjLog(relIdType,relId);
            ubaLogRemoteService.saveUserBrowseObjLogOne(request);
        }
    }
	*/
	
}
